package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 用户和会员卡关联表
 * </p>
 *
 * @author Atlakyn
 * @since 2021-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_user_member")
public class UserMember extends Model<UserMember> {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 会员卡ID
     */
    private Integer memberId;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 会员卡订单号
     */
    private String orderNo;

    /**
     * 到期时间
     */
    private Date dueDate;

    /**
     * 子聪说加的字段
     */
    private Date dueDateOld;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
